{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 课程表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-11T14:20:22.457147Z",
     "start_time": "2021-10-11T14:20:22.435944Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2021-10-11 22:20\n",
      "芜湖~休息休息！！玩游戏~~睡觉觉~~\n",
      "好好享受忙碌与空闲的当下哦~\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "import time\n",
    "\n",
    "now = time.strftime(\"%Y-%m-%d %H:%M\",time.localtime())\n",
    "#now = datetime.today()\n",
    "print(now)\n",
    "\n",
    "week = time.strftime(\"%w\",time.localtime())# 定义星期为数字0-6，数字0是星期天\n",
    "hour = datetime.today().hour\n",
    "\n",
    "week_day = int(week)  #将星期与时间转化为整数，有没有都无所谓\n",
    "day_time = int(hour)\n",
    "\n",
    "if week_day == 1:\n",
    "    if day_time > 10 and day_time < 12:\n",
    "        print(\"叮叮叮~10:30有廖汉腾老师的创业基础，别迟到哦！地点在：1-401\")\n",
    "    elif day_time > 14 and day_time < 17:\n",
    "        print(\"叮叮叮~14:30有许智超老师的Python语言，别迟到哦！地点在：2实203\")#if else语句循环\n",
    "    else:\n",
    "        print(\"芜湖~休息休息！！玩游戏~~睡觉觉~~\")\n",
    "elif week_day == 2:\n",
    "    if day_time > 8 and day_time < 10:\n",
    "        print(\"叮叮叮~8:00有宋兰兰老师的定向越野，别迟到哦！地点在：西区篮球场\")\n",
    "    elif day_time > 11 and day_time > 13:\n",
    "        print(\"叮叮叮~11:20兼职，别忘记了！！\")\n",
    "    elif day_time > 14 and day_time > 16:\n",
    "        print(\"叮叮叮~14:30有游鸽老师的H5，别迟到哦！地点在：3实308\")\n",
    "    elif day_time > 16 and day_time > 18:\n",
    "        print(\"叮叮叮~16:10有袁洁老师的英语，别迟到哦！地点在：10-402\")\n",
    "    elif day_time > 18 and day_time > 20:\n",
    "        print(\"叮叮叮~18:45有曾诗楠老师的摄影作品赏析，别迟到哦！地点在：2-106\")\n",
    "    else:\n",
    "        print(\"芜湖~休息休息！！玩游戏~~睡觉觉~~\")\n",
    "elif week_day == 3:\n",
    "    if day_time > 9 and day_time < 12:\n",
    "        print(\"叮叮叮~9:45有周伟老师的毛概，别迟到哦！地点在：9-201\")\n",
    "    elif day_time > 18 and day_time > 20:\n",
    "        print(\"叮叮叮~18:45有华峥嵘老师的毛概实践，别迟到哦！地点在：7-403\")\n",
    "    else:\n",
    "        print(\"芜湖~休息休息！！玩游戏~~睡觉觉~~\")\n",
    "elif week_day == 4:\n",
    "    if day_time > 14 and day_time < 16:\n",
    "        print(\"叮叮叮~14:30有袁洁老师的英语，别迟到哦！地点在：10-304\")\n",
    "    elif day_time > 11 and day_time > 13:\n",
    "        print(\"叮叮叮~11:20兼职，别忘记了！！\")\n",
    "    elif day_time > 17 and day_time > 19:\n",
    "        print(\"叮叮叮~17:00兼职，别忘记了！！\")\n",
    "    else:\n",
    "        print(\"芜湖~休息休息！！玩游戏~~睡觉觉~~\")\n",
    "elif week_day == 5:\n",
    "    if day_time > 10 and day_time < 12:\n",
    "        print(\"叮叮叮~10:35有阚凤霞老师的illustrator，别迟到哦！地点在：新综612\")\n",
    "    elif day_time > 14 and day_time > 16:\n",
    "        print(\"叮叮叮~14:30有温灵老师的手绘艺术基础，别迟到哦！地点在：1-203\")\n",
    "    else:\n",
    "        print(\"芜湖~休息休息！！玩游戏~~睡觉觉~~\")\n",
    "else:\n",
    "    print(\"周末时间~随意发挥~\")\n",
    "\n",
    "print(\"好好享受忙碌与空闲的当下哦~\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-02T08:08:55.547118Z",
     "start_time": "2021-10-02T08:08:55.533047Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2021-10-02 16:08:55.534057 -7\n"
     ]
    }
   ],
   "source": [
    "now = datetime.today()\n",
    "i = now.minute-15\n",
    "print(now,i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-02T08:06:25.535819Z",
     "start_time": "2021-10-02T08:06:25.515213Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2021-10-02 08:06:25'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import time\n",
    "time.strftime(\"%Y-%m-%d %H:%M:%S\",time.gmtime())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-02T09:55:23.268683Z",
     "start_time": "2021-10-02T09:55:23.253164Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'6'"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import time\n",
    "time.strftime(\"%w\",time.localtime())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-02T10:02:07.007841Z",
     "start_time": "2021-10-02T10:02:06.989681Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "18"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.today().hour"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
